<template>
  <Card :bordered="false">
    <p slot="title">标签 <span class="clear"  @click="chooseTag('')">全部</span></p>
    <p>
      <template v-for="item in art_tag">
        <Tag
          :color="tag === item.name?'default':'primary'"
          :key="item.id"
          @click.native="chooseTag(item.name)"
          style="cursor:pointer"
        >{{item.name}}</Tag>
      </template>
    </p>
  </Card>
</template>

<script>
import { mixin } from "@/utils/mixin";
export default {
  mixins: [mixin],
  data(){
    return{
      tag:''
    }
  },
  methods: {
    chooseTag(tag) {
      this.tag = tag;
      this.$emit('changeTag',tag)
    }
  }
};
</script>


<style lang="less" scoped>

</style>
